﻿<?xml version="1.0" encoding="utf-8"?>
<UserControl
	x:ClassModifier="internal"
	x:Class="ICSharpCode.SharpDevelop.Project.Converter.UpgradeView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core">
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition
				Height="Auto" />
			<RowDefinition
				Height="*" />
			<RowDefinition
				Height="Auto" />
			<RowDefinition
				Height="Auto" />
		</Grid.RowDefinitions>
		<TextBlock
			Name="upgradeDescription"
			Visibility="Collapsed"
			Grid.Column="0"
			Grid.Row="0"
			TextWrapping="WrapWithOverflow"
			Margin="8,8,8,4"
			Text="{core:Localize ICSharpCode.SharpDevelop.Project.UpgradeView.UpgradeFromPreviousVersionDescription}" />
		<ListView
			x:Name="listView"
			core:SortableGridViewColumn.SortMode="Automatic"
			Grid.Column="0"
			Grid.Row="1"
			Margin="8,4,8,4"
			SelectionMode="Multiple"
			SelectionChanged="ListView_SelectionChanged">
			<ListView.View>
				<GridView>
					<core:SortableGridViewColumn
						x:Name="nameColumn"
						SortBy="Name"
						Header="{core:Localize ICSharpCode.FiletypeRegisterer.Project}">
						<GridViewColumn.CellTemplate>
							<DataTemplate>
								<CheckBox
									Content="{Binding Name}"
									IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsSelected}" />
							</DataTemplate>
						</GridViewColumn.CellTemplate>
					</core:SortableGridViewColumn>
					<core:SortableGridViewColumn
						DisplayMemberBinding="{Binding CompilerVersionName}"
						Header="{core:Localize ICSharpCode.SharpDevelop.Project.UpgradeView.CompilerVersion}" />
					<core:SortableGridViewColumn
						DisplayMemberBinding="{Binding TargetFrameworkName}"
						Header="{core:Localize ICSharpCode.SharpDevelop.Project.UpgradeView.TargetFramework}" />
				</GridView>
			</ListView.View>
		</ListView>
		<CheckBox
			Content="{core:Localize Global.SelectAllButtonText}"
			Grid.Row="2"
			Name="selectAllCheckBox"
			Checked="SelectAllCheckBox_Checked"
			Unchecked="SelectAllCheckBox_Unchecked"
			HorizontalAlignment="Left"
			Margin="10,0,0,0" />
		<GroupBox
			Grid.Column="0"
			Grid.Row="3"
			HorizontalAlignment="Stretch"
			VerticalAlignment="Stretch"
			Margin="8,0,8,8"
			Header="{core:Localize ICSharpCode.SharpDevelop.Project.UpgradeView.ChangeVersionGroupBoxHeader}"
			Name="conversionGroupBox">
			<Grid
				Margin="4">
				<Grid.RowDefinitions>
					<RowDefinition
						Height="Auto" />
					<RowDefinition
						Height="Auto" />
					<RowDefinition
						Height="Auto" />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition
						Width="Auto" />
					<ColumnDefinition
						Width="210" />
				</Grid.ColumnDefinitions>
				<Label
					Content="{core:Localize ICSharpCode.SharpDevelop.Project.UpgradeView.ChangeCompilerVersionLabel}"
					Grid.Column="0"
					Grid.Row="0"
					Target="{Binding ElementName=newVersionComboBox}" />
				<ComboBox
					Name="newVersionComboBox"
					DisplayMemberPath="DisplayName"
					SelectionChanged="newVersionComboBox_SelectionChanged"
					VerticalAlignment="Center"
					Grid.Row="0"
					Grid.Column="1" />
				<Label
					Content="{core:Localize ICSharpCode.SharpDevelop.Project.UpgradeView.ChangeTargetFrameworkLabel}"
					Grid.Column="0"
					Grid.Row="1"
					Target="{Binding ElementName=newFrameworkComboBox}" />
				<ComboBox
					Name="newFrameworkComboBox"
					Grid.Column="1"
					Grid.Row="1"
					VerticalAlignment="Center"
					DisplayMemberPath="DisplayName"
					SelectionChanged="newFrameworkComboBox_SelectionChanged" />
				<Button
					Name="convertButton"
					Style="{x:Static core:GlobalStyles.ButtonStyle}"
					HorizontalAlignment="Center"
					Content="{core:Localize ICSharpCode.SharpDevelop.Project.UpgradeView.ConvertButton}"
					Grid.Column="0"
					Grid.ColumnSpan="2"
					Grid.Row="2"
					Click="convertButton_Click" />
			</Grid>
		</GroupBox>
	</Grid>
</UserControl>